﻿using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using XRM.Security.DataAccess.Interfaces;

namespace XRM.Security.DataAccess.Models
{
    [Table("SystemUser")]
    public class SystemUser : IFio
    {
        [Key]
        [DatabaseGeneratedAttribute(DatabaseGeneratedOption.Identity)]
        public int Id { get; set; }

        [Required]
        [MaxLength(50)]
        public string Login { get; set; }

        [Required]
        [MaxLength(50)]
        public string FirstName { get; set; }

        [Required]
        [MaxLength(50)]
        public string LastName { get; set; }

        [MaxLength(50)]
        public string MotherName { get; set; }

        [Required]
        [MaxLength(500)]
        public string Post { get; set; }

        [Required]
        public bool IsDeleted { get; set; }

        public virtual ICollection<RoleMember> RoleMembers { get; set; }
    } 
}
